package zhuoyue.com.yanjiaohui.interfacepackage;


import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;
import zhuoyue.com.yanjiaohui.entity.PostRegistCallBackEntity;
import zhuoyue.com.yanjiaohui.entity.PostRegisterEntity;
import zhuoyue.com.yanjiaohui.entity.SmsBackEntity;
import zhuoyue.com.yanjiaohui.entity.SmsSendData;

/**
 * Created by ShellJor on 2017/4/30 0030.
 * at 10:58
 */

public interface INetService {

//    @FormUrlEncoded
//    @POST("/home/user/reg")
//    @Headers({"Content-Type: application/json;charset=UTF-8"})
//    Call<PostRegistCallBackEntity> postTest(
//                                            @Field("mobile") String mobile,
//                                            @Field("code") String code,
//                                            @Field("user_name") String user_name,
//                                            @Field("user_pwd") String user_pwd,
//                                            @Field("mac_id") String mac_id);

    //用这个请求注册
//    @FormUrlEncoded
//    @POST("home/user/reg")
//    @Headers({"Content-Type: application/json;charset=UTF-8"})
//    Call<PostRegistCallBackEntity> postRegistData(@Body PostRegisterEntity registerEntity);

    @FormUrlEncoded
    @POST("home/user/reg")
    @Headers({"Content-Type: application/json;charset=UTF-8"})
    Call<PostRegistCallBackEntity> postRegistData(@Body PostRegisterEntity registerEntity);


    //这个是请求手机验证码的 ok。
    @POST("http://123.56.47.136:9017/index.php/home/user/regsmssend?phone=18345963106")
    Call<SmsBackEntity>postphoneData();

//    @POST("home/user/reg")
//    Call<PostRegistCallBackEntity> postRegistData(
//                                                  Map<String,String>user_name,
//                                                  Map<String,String>user_pwd,
//                                                  Map<String,String>mobile,
//                                                  Map<String,String>code
//                                                );
    @FormUrlEncoded
    @POST("home/user/reg")
    Call<PostRegistCallBackEntity>PostRegistData(@FieldMap Map<String,String> params);



}